package com.sdy.dcsb.biz.service.impl;

import com.sdy.dcsb.biz.mapper.EsbInboundMainMapper;
import com.sdy.dcsb.biz.model.EsbInboundMain;
import com.sdy.dcsb.biz.model.EsbInboundMainAndAtomservice;
import com.sdy.dcsb.biz.model.EsbInboundMainJoint;
import com.sdy.dcsb.biz.model.EsbVo;
import com.sdy.dcsb.biz.service.EsbInboundMainService;
import com.sdy.mvc.service.impl.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * 标准服务配置表 服务实现类
 * </p>
 *
 * @author fb
 * @since 2019-09-25
 */
@Slf4j
@Service
public class EsbInboundMainServiceImpl extends BaseServiceImpl<EsbInboundMain> implements EsbInboundMainService {
    @Autowired
    private EsbInboundMainMapper esbInboundMainMapper;
    @Autowired
    private EsbInboundMainService esbInboundMainService;


    @Override
    public List<EsbInboundMainJoint> findSubServiceById(Integer id, Integer current, Integer size) {
        return esbInboundMainMapper.findSubServiceById(id, current, size);
    }

    @Override
    public List<EsbInboundMainJoint> findCountServiceById(Integer id) {
        return esbInboundMainMapper.findCountServiceById(id);
    }

    @Override
    public List<EsbInboundMainJoint> findSubServiceByIdName(Integer id, Integer current, Integer size, String name) {
        return esbInboundMainMapper.findSubServiceByIdName(id, current, size, name);
    }

    @Override
    public List<EsbInboundMainJoint> findCountServiceByIdName(Integer id, String name) {
        return esbInboundMainMapper.findCountServiceByIdName(id, name);
    }

    @Override
    public List<EsbInboundMainJoint> findSubServiceByIdCode(Integer id, Integer current, Integer size, String code) {
        return esbInboundMainMapper.findSubServiceByIdCode(id, current, size, code);
    }

    @Override
    public List<EsbInboundMainJoint> findCountServiceByIdCode(Integer id, String code) {
        return esbInboundMainMapper.findCountServiceByIdCode(id, code);
    }

    @Override
    public List<EsbInboundMain> findServiceList(String type, String message, String status, Integer current, Integer size) {
        return esbInboundMainMapper.findServiceList(type, message, status, current, size);
    }

    @Override
    public List<EsbInboundMain> findServiceListCount(String type, String message, String status) {
        return esbInboundMainMapper.findServiceListCount(type, message, status);
    }

    @Override
    public List<EsbInboundMainAndAtomservice> selectBanch(Integer[] idList) {
        List<Integer> idlist = Arrays.asList(idList);
        EsbVo esbVo = new EsbVo();
        esbVo.setIdList(idlist);
        return esbInboundMainMapper.selectBanch(esbVo);
    }


}
